package com.eling.elcms.travel.model;

import com.eling.elcms.core.dao.annotation.In;
import com.eling.elcms.core.model.BaseModel;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.IndexedEmbedded;

import javax.persistence.*;

/**
 * 入住联盟确认
 * @author zhoulin
 *
 */
@Entity
@Table(name = "travel_allianceconfirm")
@Indexed
public class AllianceConfirm extends BaseModel {

	private static final long serialVersionUID = -4466043439329027663L;

	@Id
	@In
	@DocumentId
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long pkAllianceConfirm;
	
	/** 预约*/
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "pkGroupReserve")
	@IndexedEmbedded(depth = 1)
	private GroupReserve groupReserve;
	
	@Version
	private Integer version;

	public Long getPkAllianceConfirm() {
		return pkAllianceConfirm;
	}

	public void setPkAllianceConfirm(Long pkAllianceConfirm) {
		this.pkAllianceConfirm = pkAllianceConfirm;
	}

	public GroupReserve getGroupReserve() {
		return groupReserve;
	}

	public void setGroupReserve(GroupReserve groupReserve) {
		this.groupReserve = groupReserve;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}
	
}
